<template>
  <div class="editInfo">
    <hmNavBar title="修改昵称" right="保存" path="/home/myInfo"></hmNavBar>
    <div class="content">
      <van-field class="field" v-model="inputValue" />
    </div>
  </div>
</template>

<script>
import { mapState } from 'vuex'
export default {
  data () {
    return {
      inputValue: ''
    }
  },
  computed: {
    ...mapState(['userInfo'])
  },
  created () {
    this.inputValue = this.userInfo.nickname
  }
}
</script>

<style lang="less" scoped>
.editInfo {
  padding: 20px @15 0;
  .field {
    background-color: #f7f4f5;
  }
}
</style>
